module.exports = app => {
    const mongoose = app.mongoose;
    const Schema = mongoose.Schema;

    const ArticleSchema = new Schema({
        date: { type: String },
        title: { type: String },
        avatar: { type: String },
        content: { type: String },
        reading: { type: String },
        collectNum: { type: Number },
        headImgSrc: { type: String },
        author: { type: String },
        dateTime: { type: String },
        detail: { type: String },
        postId: { type: Number },
        music: { type: Object },
        collected: { type: Boolean }
    });
    return mongoose.model('Article', ArticleSchema, 'article');
}